package bb.lanxing.activity.sns;

import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;

public final class SnsProviders {
    private final List<SnsProvider> providers;
    private final String user_id;

    public static /* synthetic */ SnsProviders copy$default(SnsProviders snsProviders, String str, List list, int i, Object obj) {
        if ((i & 1) != 0) {
            str = snsProviders.user_id;
        }
        if ((i & 2) != 0) {
            list = snsProviders.providers;
        }
        return snsProviders.copy(str, list);
    }

    public final String component1() {
        return this.user_id;
    }

    public final List<SnsProvider> component2() {
        return this.providers;
    }

    public final SnsProviders copy(String user_id, List<SnsProvider> providers) {
        Intrinsics.checkNotNullParameter(user_id, "user_id");
        Intrinsics.checkNotNullParameter(providers, "providers");
        return new SnsProviders(user_id, providers);
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof SnsProviders)) {
            return false;
        }
        SnsProviders snsProviders = (SnsProviders) obj;
        return Intrinsics.areEqual(this.user_id, snsProviders.user_id) && Intrinsics.areEqual(this.providers, snsProviders.providers);
    }

    public int hashCode() {
        return (this.user_id.hashCode() * 31) + this.providers.hashCode();
    }

    public String toString() {
        return "SnsProviders(user_id=" + this.user_id + ", providers=" + this.providers + ')';
    }

    public SnsProviders(String user_id, List<SnsProvider> providers) {
        Intrinsics.checkNotNullParameter(user_id, "user_id");
        Intrinsics.checkNotNullParameter(providers, "providers");
        this.user_id = user_id;
        this.providers = providers;
    }

    public final String getUser_id() {
        return this.user_id;
    }

    public final List<SnsProvider> getProviders() {
        return this.providers;
    }

    public final boolean isStravaConnected() {
        Object obj;
        Iterator it = this.providers.iterator();
        while (true) {
            if (!it.hasNext()) {
                obj = null;
                break;
            }
            obj = it;
            if (Intrinsics.areEqual(((SnsProvider) obj).getProvider(), "strava")) {
                break;
            }
        }
        return obj != null;
    }
}
